package com.brspace.qualitycontrol.controller.admin;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.brspace.qualitycontrol.entity.MeetNotice;
import com.brspace.qualitycontrol.entity.Plusclass;
import com.brspace.qualitycontrol.service.PlusclassService;
import com.brspace.qualitycontrol.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2021-04-02
 */
@Api(description = "加班")
@CrossOrigin
@RestController
@RequestMapping("/admin/plusclass")
public class PlusclassController {
    @Resource
    private PlusclassService plusclassService;

    /**
     * 添加加班申请
     * @param plusclass
     * @return
     */
    @ApiOperation("添加加班")
    @PostMapping("addPlus")
    public R addPlus( Plusclass plusclass){
        return plusclassService.addPlus(plusclass);
    }

    /**
     * 加班列表
     * @return
     */
    @ApiOperation("加班列表")
    @PostMapping("list")
    public R list(){
        List<Plusclass> list = plusclassService.list();
        return R.ok().data("list",list);
    }



}

